*{
    padding:0px;
    margin:0px;
}
.out{	/*最外面的div*/
    width:500px;
    height:300px;
    background-color:red;
    position:absolute;
    line-height:300px;
    text-align:center;
}
.inside{  /*在div类名为out里的div*/
    width:300px;
    height:100px;
    background-color:yellow;
    margin:auto;
    margin-top:100px;
}